import request from '@/utils/api/request'

// 柚子小组的周报标签
export const getTag = (listId) => {
  return request({
    method: 'GET',
    url: `/category/get?gid=${listId}`,
  })
}
// 发布周报
export const addArticle = data => {
  return request({
    method: 'POST',
    url: '/GroupLib/groupDocument/document',
    data,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
export function updateDoc (data, docid) {
  return request({
    method: 'PUT',
    url: `/GroupLib/groupDocument/change?docid=${docid}`,
    data,
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
// 根据id获取小组文章的详情页
export const getArchive = listId => {
  return request({
    method: 'GET',
    url: `/GroupLib/groupDocument/archive?docid=${listId}`
  })
}
// 上传图片
export const updatImg = data => {
  return request({
    method: 'POST',
    url: `/aliyun/oss/upfila`,
    data: data
  })
}
